package com.cx.common.core.dto.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;

@ApiModel(description = "基础请求对象")
@SuperBuilder(builderMethodName = "sBuilder")
@Accessors(chain = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "请求时间 10位时间戳", hidden = true, required = true, example = "1598842523")
    private Long time;

    @ApiModelProperty(value = "请求来源ip", hidden = true, required = true, example = "127.0.0.1")
    private String ip;

    @ApiModelProperty(value = "请求用户ID", hidden = true, required = true, example = "111111")
    private String id;

    @ApiModelProperty(value = "请求用户角色", hidden = true, required = true, example = "1")
    private Integer role;

    @ApiModelProperty(value = "请求来源系统（0-总后台，1-商户，2-app）", hidden = true, required = true, example = "127.0.0.1")
    private Byte system;
}
